<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .loading{
            width: 500px;
            height: 300px;
            margin: 0 auto;
            background-color: #a89a9a;
            border-radius: 5px;
            box-sizing: border-box;
            padding: 10px;
        }

        .loading p{
            text-align: center;
        }



        .loading .line{
            float: left;
            width: 10px;
            height: 10px;
            margin-left: 5px;
            background-color: brown;
            border-radius: 50%;
            transform: translateX(-150px);
        }

        .loading .line:nth-child(2){
            background-color: orange;
            margin-left: 150px;
        }


        .loading .line-1{
            animation:k-loading 4s infinite;
            animation-delay: .8s;
        }

        /*.loading .line-2{*/
        /*    animation:k-loading 4s infinite;*/
        /*    animation-delay: .7s;*/
        /*}*/
        /*.loading .line-3{*/
        /*    animation:k-loading 4s infinite;*/
        /*    animation-delay: .6s;*/
        /*}*/
        /*.loading .line-4{*/
        /*    animation:k-loading 4s infinite;*/
        /*    animation-delay: .5s;*/
        /*}*/
        /*.loading .line-5{*/
        /*    animation:k-loading 4s infinite;*/
        /*    animation-delay: .4s;*/
        /*}*/
        /*.loading .line-6{*/
        /*    animation:k-loading 4s infinite;*/
        /*    animation-delay: .3s;*/
        /*}*/
        /*.loading .line-7{*/
        /*    animation:k-loading 4s infinite;*/
        /*    animation-delay: .2s;*/
        /*}*/
        /*.loading .line-8{*/
        /*    animation:k-loading 4s infinite;*/
        /*    animation-delay: .1s;*/
        /*}*/

        @keyframes k-loading {
            40%{
                transform: translateX(0);
                opacity: .8;
            }
            100%{
                transform: translateX(300px);
                opacity: 0;
            }
        }

    </style>
</head>
<body>
    <div class="loading">
        <p>loading</p>
        <div class="line line-1"></div>
        <div class="line line-2"></div>
        <div class="line line-3"></div>
        <div class="line line-4"></div>
        <div class="line line-5"></div>
        <div class="line line-6"></div>
        <div class="line line-7"></div>
        <div class="line line-8"></div>
    </div>
</body>
</html>